package com.oa.util;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;

import com.alibaba.fastjson.JSON;

public class WriteResult {
	
	public static void write(HttpServletResponse response, Object obj) {
		PrintWriter writer;
		try {
			writer = response.getWriter();
			writer.write(JSON.toJSONString(obj));
			writer.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
